This is a snippet of code
Code:
FROM THE MAIN FUNCTION:
Push(s1,check,line); /*s1 is a structure with elements Element *contents;
int top;
int lineST;
check is a string array
line is an integer */
PUSH FUNCTION ACCESSED FROM ANOTHER C FILE:
void Push(stackST *stackP, char* element, int line)
{
/* Put information in array; update top. */
char newelement[20];
int i=0;
int length = strlen(element);
for (i=0;i<=length;i++)
newelement[i++]=putchar(*element++);
newelement[i] = '/0';
stackP->contents[++stackP->top] = newelement;
stackP->lineST=line;
}
I get the following warning and error for the line marked in bold
warning: multi-character character constant
error:invalid conversion from `char*' to `char'
I have twisted the code a lot. But cant figure the solution to this problem.